3.420 \(\int \frac{a+b \log (c x^n)}{x (c-x^{-n})} \, dx\)

Optimal. Leaf size=37 \[ \frac{a \log \left (1-c x^n\right )}{c n}-\frac{b \text{PolyLog}\left (2,1-c x^n\right )}{c n} \]

[Out]

(a*Log[1 - c*x^n])/(c*n) - (b*PolyLog[2, 1 - c*x^n])/(c*n)

________________________________________________________________________________________

Rubi [A]  time = 0.144024, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {2343, 2333, 2316, 2315} \[ \frac{a \log \left (1-c x^n\right )}{c n}-\frac{b \text{PolyLog}\left (2,1-c x^n\right )}{c n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(c - x^(-n))),x]

[Out]

(a*Log[1 - c*x^n])/(c*n) - (b*PolyLog[2, 1 - c*x^n])/(c*n)

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Dist[1/n, Subst[Int[(a
 + b*Log[c*x])/(x*(d + e*x^(r/n))), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IntegerQ[r/n]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol] :> Int[(e + d*
x)^q*(a + b*Log[c*x^n])^p, x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && EqQ[m, q] && IntegerQ[q]

Rule 2316

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[((a + b*Log[-((c*d)/e)])*Log[d + e*
x])/e, x] + Dist[b, Int[Log[-((e*x)/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[-((c*d)/e), 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{x \left (c-x^{-n}\right )} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a+b \log (c x)}{\left (c-\frac{1}{x}\right ) x} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \frac{a+b \log (c x)}{-1+c x} \, dx,x,x^n\right )}{n}\\ &=\frac{a \log \left (1-c x^n\right )}{c n}+\frac{b \operatorname{Subst}\left (\int \frac{\log (c x)}{-1+c x} \, dx,x,x^n\right )}{n}\\ &=\frac{a \log \left (1-c x^n\right )}{c n}-\frac{b \text{Li}_2\left (1-c x^n\right )}{c n}\\ \end{align*}

Mathematica [A]  time = 0.0176798, size = 37, normalized size = 1. \[ \frac{b \text{PolyLog}\left (2,c x^n\right )+\log \left (1-c x^n\right ) \left (a+b \log \left (c x^n\right )\right )}{c n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(c - x^(-n))),x]

[Out]

((a + b*Log[c*x^n])*Log[1 - c*x^n] + b*PolyLog[2, c*x^n])/(c*n)

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 33, normalized size = 0.9 \begin{align*}{\frac{a\ln \left ( c{x}^{n}-1 \right ) }{nc}}-{\frac{b{\it dilog} \left ( c{x}^{n} \right ) }{nc}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(c-1/(x^n)),x)

[Out]

1/n*a/c*ln(c*x^n-1)-1/n/c*b*dilog(c*x^n)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} b \int \frac{x^{n} \log \left (c\right ) + x^{n} \log \left (x^{n}\right )}{c x x^{n} - x}\,{d x} + \frac{a \log \left (\frac{c x^{n} - 1}{c}\right )}{c n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(c-1/(x^n)),x, algorithm="maxima")

[Out]

b*integrate((x^n*log(c) + x^n*log(x^n))/(c*x*x^n - x), x) + a*log((c*x^n - 1)/c)/(c*n)

________________________________________________________________________________________

Fricas [A]  time = 1.30936, size = 115, normalized size = 3.11 \begin{align*} \frac{b n \log \left (-c x^{n} + 1\right ) \log \left (x\right ) + b{\rm Li}_2\left (c x^{n}\right ) +{\left (b \log \left (c\right ) + a\right )} \log \left (c x^{n} - 1\right )}{c n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(c-1/(x^n)),x, algorithm="fricas")

[Out]

(b*n*log(-c*x^n + 1)*log(x) + b*dilog(c*x^n) + (b*log(c) + a)*log(c*x^n - 1))/(c*n)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(c-1/(x**n)),x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left (c x^{n}\right ) + a}{{\left (c - \frac{1}{x^{n}}\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(c-1/(x^n)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/((c - 1/x^n)*x), x)